package com.note7_4;

import java.util.Calendar;
/**
 * 
 * @author 60973
 * 一件商品生产日期是2017/7/12,保质期50天，算出失效日期
 */
public class Question1 {
	
	public static void main(String[] args) {
		Calendar c = Calendar.getInstance();
		c.set(2017,6, 12);
		c.add(Calendar.DATE, 50);
		int year = c.get(Calendar.YEAR);
		int month = c.get(Calendar.MONTH) + 1;
		int day = c.get(Calendar.DATE);
		System.out.println("失效日期是"+year+"年 "+month+"月 "+day+"日");
	}
}
